<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>项目启动页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #4361ee, #3a0ca3);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: white;
            text-align: center;
            padding: 20px;
        }

        .launch-container {
            max-width: 600px;
            width: 100%;
            padding: 40px 20px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(3, 10, 58, 0.3);
        }

        .launch-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            letter-spacing: 2px;
        }

        .launch-desc {
            font-size: 1.1rem;
            margin-bottom: 30px;
            opacity: 0.9;
        }

        .countdown {
            font-size: 1.2rem;
            margin: 25px 0;
            padding: 15px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            display: inline-block;
        }

        .jump-btn {
            padding: 12px 35px;
            background: white;
            color: #3a0ca3;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 10px;
        }

        .jump-btn:hover {
            background: #f0f0f0;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
        }

        /* 倒计时动画效果 */
        @keyframes fadeIn {
            from { opacity: 0.6; }
            to { opacity: 1; }
        }

        .countdown span {
            animation: fadeIn 0.5s infinite alternate;
            color: #ffd60a; /* 倒计时数字用醒目黄色 */
            font-weight: bold;
        }
    </style>
</head>
<body>
<div class="launch-container">
    <h1 class="launch-title">项目正式启动</h1>
    <p class="launch-desc">系统已就绪，即将为您跳转至登录页面</p>

    <div class="countdown">
        自动跳转倒计时：<span id="count">5</span> 秒
    </div>

    <button class="jump-btn" onclick="jumpToLogin()">
        立即前往登录页
    </button>
</div>

<script>
    // 倒计时秒数（默认5秒）
    let countdown = 5;
    // 倒计时定时器
    let timer = null;

    // 页面加载完成后启动倒计时
    window.onload = function() {
        startCountdown();
    };

    // 倒计时逻辑
    function startCountdown() {
        timer = setInterval(() => {
            countdown--;
            // 更新倒计时显示
            document.getElementById('count').textContent = countdown;

            // 倒计时结束，自动跳转
            if (countdown <= 0) {
                clearInterval(timer); // 清除定时器
                jumpToLogin(); // 执行跳转
            }
        }, 1000); // 每秒执行一次
    }

    // 手动/自动跳转方法（统一逻辑）
    function jumpToLogin() {
        // 跳转至登录页（确保index.html与login.html在同一目录）
        window.location.href = 'login.html';
    }

    // 防止页面关闭时定时器未清除（优化性能）
    window.onbeforeunload = function() {
        if (timer) clearInterval(timer);
    };
</script>
</body>
</html>